import bpy


import engine.initLIB.load_dll as engineLib
import ctypes

from bpy.types import Operator, Menu

import 全局控制.Node.插座.bl_插座基类 as 插座基类


E_菜单页面项 = [
	("TYPE_节点属性_节点属性",	"节点属性", "", 0),
	("TYPE_节点属性_节点插座",	"节点插座", "", 1),
	#("TYPE_插座维度_3",	"3D", "", 2),
	#("TYPE_插座维度_4", "4D", "", 3),
]




class C_节点属性参数设置菜单(Menu):
	bl_label = "节点属性参数设置"
	bl_idname = "node.enum_set_node_attribute_parameter"
	#preset_subdir = "object/draw"
	#draw = Menu.draw_preset
	m_属性配置 = bpy.props.EnumProperty(items=E_菜单页面项, name="维度", default="TYPE_节点属性_节点属性")

	m_TreeName = bpy.props.StringProperty()
	m_NodeName = bpy.props.StringProperty()
	def draw(self, context):
		layout = self.layout
		行布局 = layout.column()
		导航布局 = 行布局.row()

		导航布局.prop(self, 'm_属性配置', expand=True)

		列布局 = layout.row()
		if self.m_属性配置 == 'TYPE_节点属性_节点属性':
			行布局.label(text='修改')
			
			行布局.separator()
			
		else:
			行布局.label(text='插座')









class C_NODE_AddMenu_打开节点设置菜单(bpy.types.Operator):
	bl_idname = 'node.open_node_set_menu'
	bl_label = '打开节点设置菜单'
	bl_options = {'REGISTER', 'UNDO'}
	def execute(self, context):
		bpy.ops.wm.call_menu(name="node.enum_set_node_attribute_parameter")
		#row.menu(C_节点属性参数设置菜单.__name__, text=C_节点属性参数设置菜单.bl_label)
		return {'FINISHED'}




classes = (
	C_节点属性参数设置菜单,

	C_NODE_AddMenu_打开节点设置菜单,
)

def register():
	for c in classes:
		bpy.utils.register_class(c)

def unregister():
	for c in classes:
		bpy.utils.unregister_class(c)

	




